package com.wjf.birdfish.util;

import java.io.IOException;
import javax.servlet.*;
import org.apache.log4j.helpers.LogLog;

public class SetCharacterEncodingFilter extends ServletFilter
{

    public SetCharacterEncodingFilter()
    {
    }

    public void doFilter(ServletRequest servletrequest, ServletResponse servletresponse, FilterChain filterchain)
        throws IOException, ServletException
    {
        try
        {
            servletrequest.setCharacterEncoding("UTF-8");
        }
        catch(Exception exception)
        {
            LogLog.error("SetCharacterEncodingFilter.java Method doFilter Exception:", exception);
        }
        filterchain.doFilter(servletrequest, servletresponse);
    }
}